package sm

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

var bmMenuService = BmMenuService{}
//查询菜单
func BmSmMenuQueryByPid(c *gin.Context) {
	pid := c.DefaultQuery("pid", "")
	if pid == "" {
		pid = c.Param("pid")
	}
	if pid == "" {
		pid = "0"
	}
	res, msg, data := bmMenuService.QueryMenuByPid(pid)
	c.JSON(http.StatusOK, gin.H{"res":res, "msg":msg, "data":data})
}
